<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>主页</title>
<!--    <link rel="stylesheet" href="./css/main.css">-->
</head>

<body>
<!-- 题目 -->
<div class="nav">
    <h3 class="title">图书系统管理</h3>
    <div class="right">
        <a href="#" class="statement">使用说明</a>
        <a href="#">用户</a>
    </div>
</div>
<div class="nav-left">
    <a href="@{/library}">藏书阁</a>
    <a href="#">借书证</a>
</div>
<div class="nav-right">
    <table border="1" cellpadding="0" cellspacing="0">
        <tr class="firstTr">
            <th width="5%">编号</th>
            <th width="10%">书名</th>
            <th width="5%">书号</th>
            <th width="10%">作者</th>
            <th width="8%">出版社</th>
            <th width="5%">定价</th>
            <th width="20%">内容简介</th>
            <th width="20%">操作</th>
        </tr>
<!--        通过getList()方法来获得List对象-->
        <tr th:each="book:${pageInfo.getList()}">
            <td>
                <span th:text="${book.bookId}">${news.id }</span>
            </td>
            <td>
                <span th:text="${book.bookName}">${news.newsname }</span>
            </td>
            <td>
                <span th:text="${book.bookISBN}">${news.author }</span>
            </td>
            <td>
                <span th:text="${book.author}">${news.time }</span>
            </td>
            <td>
                <span th:text="${book.publisher}">${news.time }</span>
            </td>
            <td>
                <span th:text="${book.money}">${news.time }</span>
            </td>
            <td>
                <span th:text="${book.text}">${news.time }</span>
            </td>
            <td>
                <span><a href="#" class="detail"> 详情</a></span>
                <span><a href="#" class="lend"> 借书</a></span>
                <span><a href="#" class="returns"> 还书</a></span>
            </td>
        </tr>

    </table>

    <p>当前 <span th:text="${pageInfo.pageNum}"></span> 页,
        总 <span th:text="${pageInfo.pages}"></span> 页,
        共 <span th:text="${pageInfo.total}"></span> 条记录
    </p>
<lable th:each="num:${#numbers.sequence(1,pageInfo.pages)}">
    <a th:href="@{/books(pageNum=${num})}">[[${num}]]</a>
</lable>
</div>
</body>

</html>